package com.javasm.adminapi.module.product1.controller;

import com.github.pagehelper.PageInfo;
import com.javasm.adminapi.common.R;
import com.javasm.adminapi.module.product1.entity.GgGoods;
import com.javasm.adminapi.module.product1.service.GgGoodsService;
import com.javasm.adminapi.module.product1.vo.SearchVo;
import com.javasm.adminapi.module.supplier.service.GgSupplierGoodsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @className: GgGoodsController
 * @description:
 * @author: lrg
 * @date: 2025/10/15 22:52
 * @version: 0.1
 * @since: jdk17
 */

@RestController
@RequestMapping("/GcGoods")
public class GgGoodsController {

    @Resource
    GgSupplierGoodsService ggSupplierGoodsService;
    @Resource
    GgGoodsService ggGoodsService;
    @GetMapping("/listAll")
    public R listAllGoodsByCondition(SearchVo searchVo){
        PageInfo<GgGoods> list = ggGoodsService.listAllWithTypeName(searchVo);
        return R.ok(list);
    }


}
